import {setServer} from "@/utils/axios";
const request = setServer('');

// 查询停车场
export function getParking(query) {
  return request({
    url: '/biotope/parking/lot/list',
    method: 'get',
    params: query
  })
}


// 获取停车场详情
export function getParkingDetail(id) {
  return request({
    url: '/biotope/parking/lot/'+id,
    method: 'get',
  })
}

// 新增停车场
export function addParking(query) {
  return request({
    url: '/biotope/parking/lot/',
    method: 'post',
    data: query
  })
}

// 修改停车场
export function updateParking(query) {
  return request({
    url: '/biotope/parking/lot/',
    method: 'put',
    data: query
  })
}


// 删除停车场
export function deleteParking(id) {
  return request({
    url: '/biotope/parking/lot/'+id,
    method: 'delete',
  })
}

// 通过小区id查询停车场
export function getParkingByBiotopeId(id) {
  return request({
    url: '/biotope/parking/lot/refer/'+id,
    method: 'get',
  })
}
